local autocmd = vim.api.nvim_create_autocmd

-- ==============================================
-- Highlight current line number
-- ==============================================

local line_nr_bg = "#525288"

local function highlight_current_line_number()
	vim.cmd(string.format("hi CursorLineNr guibg=%s", line_nr_bg))
end

highlight_current_line_number()


-- ==============================================
-- Disable auto inserting of comments
-- ==============================================

autocmd("FileType", {
  pattern = "*",  -- Match all file types
  callback = function()
    -- Remove 'c' from formatoptions (disables auto wrapping of comments)
    vim.opt_local.formatoptions:remove("c")
    -- Remove 'r' from formatoptions (disables auto inserting of comments on new lines)
    vim.opt_local.formatoptions:remove("r")
    -- Remove 'o' from formatoptions (disables auto inserting of comment leader when hitting Enter in insert mode)
    vim.opt_local.formatoptions:remove("o")
  end,
})

-- ==============================================
-- End
-- ==============================================
